@extends('layouts.normal')
@section('self-style')
    <link rel="stylesheet" href="/package/plugins/bootstrap-table/bootstrap-table.min.css">
    <link rel="stylesheet" href="/package/plugins/select2/select2.min.css">
    <link rel="stylesheet" href="/package/plugins/datepicker/datepicker3.css">
@endsection
@section('local-style')
    <style type="text/css">
        .bs-bars {
            width: 80%;
            margin: 10px 0;
            line-height: 34px;
        }
        .bootstrap-table .fixed-table-toolbar button {color: inherit;}
        .pagination-detail .btn-group button {color: inherit;}
        table .btn {margin-left: 10px;}
        .modal input[type="radio"] {margin-left: 20px;margin-right: 10px;}
        .modal .modal-footer button {margin-left: 40px;margin-right: 40px;}
    </style>
@endsection
@section('menu')
    @include("manager.layouts.menu")
@endsection

@section("header")
    <section class="content-header">
        <h4>
            退房管理
            <b>/</b>
            退房列表
        </h4>
    </section>
    @endsection

@section('content')
    <section class="content">
        <div class="row">
            <!-- /.col -->
            <div class="col-md-12">
                <div class="box">
                    <div class="box-header">
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table id="retire-table" data-height="600"></table>
                    </div>
                    <!-- /.tab-content -->
                </div>
                <!-- /.nav-tabs-custom -->
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </section>
@endsection


@section('modal')
    <div class="modal fade" id="view-retire-dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">退房详情</h4>
                </div>
                <div class="modal-body">
                    <div class="form-horizontal m-t">
                        <div class="form-group">
                            <label class="control-label col-sm-3"></label>
                            <div class="col-sm-9">
                                <input type="hidden" class="retire-id" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">公寓</label>
                            <div class="col-sm-9">
                                <span class="apart-name"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">退房类型</label>
                            <div class="col-sm-9">
                                <span class="retire-type"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">退房时间</label>
                            <div class="col-sm-9">
                                <div class="input-group">
                                    <div class="input-group-addon">
                                        <i class="fa fa-calendar"></i>
                                    </div>
                                    <input type="text" class="form-control checkout-at">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">已付租金情况</label>
                            <div class="col-sm-9">
                                <label class="radio-group"><input type="radio" name="is-rent-pay" value="1">已付清</label>
                                <label class="radio-group"><input type="radio" name="is-rent-pay" value="0">未付清</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">已付水费情况</label>
                            <div class="col-sm-9">
                                <label class="radio-group"><input type="radio" name="is-water-fee-pay" value="1">已付清</label>
                                <label class="radio-group"><input type="radio" name="is-water-fee-pay" value="0">未付清</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">已付电费情况</label>
                            <div class="col-sm-9">
                                <label class="radio-group"><input type="radio" name="is-electric-fee-pay" value="1">已付清</label>
                                <label class="radio-group"><input type="radio" name="is-electric-fee-pay" value="0">未付清</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">已付气费情况</label>
                            <div class="col-sm-9">
                                <label class="radio-group"><input type="radio" name="is-gas-fee-pay" value="1">已付清</label>
                                <label class="radio-group"><input type="radio" name="is-gas-fee-pay" value="0">未付清</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">设施设备情况</label>
                            <div class="col-sm-9">
                                <label class="radio-group"><input type="radio" name="is-device-safe" value="1">完好</label>
                                <label class="radio-group"><input type="radio" name="is-device-safe" value="0">有损</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">备注</label>
                            <div class="col-sm-8">
                                <div class="ibox float-e-margins">
                                    <div class="col-sm-12">
                                        <textarea  name="remark" class="retire-remark hidden"></textarea>
                                        <script id="editor" type="text/plain"></script>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary pull-left btn-save">提交</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <div class="modal fade" id="delete-retire-dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">删除退房记录</h4>
                </div>
                <div class="modal-body">
                    <div class="form-horizontal m-t">
                        <div class="form-group">
                            <label class="control-label col-sm-3"></label>
                            <div class="col-sm-9">
                                <input type="hidden" class="retire-id" />
                                <span>您确认删除本条记录吗?</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary pull-left btn-save">提交</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
@endsection



@section('self-script')
    <script src="/package/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/package/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="/package/plugins/select2/select2.full.min.js"></script>
    <script src="/package/plugins/select2/i18n/zh-CN.js"></script>
    <script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="/ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript" src="/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript" src="/js/manager/retire-index.js?v={{ time() }}"></script>
    <script src="/package/plugins/datepicker/bootstrap-datepicker.js"></script>
    <script src="/package/plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
@endsection
@section('local-script')
    <script type="text/javascript">
        $('.checkout-at').datepicker({
            "autoclose" : true,
            format: 'yyyy-mm-dd',
            "language" : "zh-CN",
        });
    </script>
@endsection